{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/ts-force-config.json",
  "definitions": {
    "AuthConfig": {
      "properties": {
        "accessToken": {
          "type": "string"
        },
        "clientId": {
          "type": "string"
        },
        "clientSecret": {
          "type": "string"
        },
        "instanceUrl": {
          "type": "string"
        },
        "oAuthHost": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "username": {
          "description": "If using `sfdx-cli` auth, this is the only property needed to authenticate.\nOtherwise, supply additional oAuth parameters",
          "type": "string"
        },
        "version": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "FieldMapping": {
      "properties": {
        "apiName": {
          "description": "The Target SObject API name",
          "type": "string"
        },
        "propName": {
          "description": "The generated class property name",
          "type": "string"
        }
      },
      "required": ["apiName", "propName"],
      "type": "object"
    },
    "SObjectConfig": {
      "description": "Object used to configure advanced settings on SObject generation",
      "properties": {
        "apiName": {
          "description": "The Target SObject API name",
          "type": "string"
        },
        "autoConvertNames": {
          "description": "Defaulted to true.  If set to false, names will NOT be auto-converted to standard javascript conventions",
          "type": "boolean"
        },
        "className": {
          "description": "The generated class name.  If not set, it will be automatically\nconverted to standard javascript Class convention",
          "type": "string"
        },
        "enforcePicklistValues": {
          "description": "*Overrides Global Setting*\nThe path to generate files to.\n   If the destination is a folder, it will generate one file per object.\n   If the destination is a `.ts` file, a single file will be generated.\n   If not set, class output will be logged to `stdout`",
          "enum": ["ALL", "RESTRICTED", false]
        },
        "fieldMappings": {
          "description": "List of field mappings to override the auto-conversion",
          "items": {
            "$ref": "#/definitions/FieldMapping"
          },
          "type": "array"
        },
        "generatePicklists": {
          "description": "*Overrides Global Setting*\nMake picklist fields strongly typed to generated enums. `generatePicklists` must also be `true`\n  `ALL`: for all picklist fields, regardless of salesforce enforcement\n  `RESTRICTED`: only on fields where the values are restricted on Salesforce",
          "type": "boolean"
        }
      },
      "required": ["apiName"],
      "type": "object"
    }
  },
  "properties": {
    "auth": {
      "$ref": "#/definitions/AuthConfig",
      "description": "Authentication Method.  Choose one of three:\n- You can either username/password oAuth configuration\n- sfdx configuration (`username` only)\n- `accessToken` & `instanceUrl`\nSee readme for examples."
    },
    "enforcePicklistValues": {
      "description": "Make picklist fields strongly typed to generated enums. `generatePicklists` must also be `true`\n  `ALL`: for all picklist fields, regardless of salesforce enforcement\n  `RESTRICTED`: only on fields where the values are restricted on Salesforce",
      "enum": ["ALL", "RESTRICTED", false]
    },
    "generatePicklists": {
      "description": "Flag to generate enums for picklist fields.  Defaulted to false",
      "type": "boolean"
    },
    "outPath": {
      "description": "The path to generate files to.\n   If the destination is a folder, it will generate one file per object.\n   If the destination is a `.ts` file, a single file will be generated.\n   If not set, class output will be logged to `stdout`",
      "type": "string"
    },
    "sObjects": {
      "description": "The SObjects to generate classes for.  Can either be a string or an `SObjectConfig` object",
      "items": {
        "anyOf": [
          {
            "$ref": "#/definitions/SObjectConfig"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "array"
    }
  },
  "type": "object"
}
