{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/speakeasy-generation-config-file/_shared/latest--typescript.schema.json",
  "title": "typescript Configuration Schema",
  "description": "Schema for configuration specific to a typescript SDK",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/speakeasy-api/sdk-gen-config/main/schemas/languages/typescript.schema.json",
    "sourceSha256": "d07c18e294d4d26a68d8d22e3d67e09b4b77973e19e924092359980489c347e0"
  },
  "type": "object",
  "properties": {
    "author": {
      "description": "The name of the author of the published package. <https://docs.npmjs.com/cli/v9/configuring-npm/package-json#people-fields-author-contributors>",
      "type": "string"
    },
    "clientServerStatusCodesAsErrors": {
      "description": "Whether to treat 4xx and 5xx status codes as errors.",
      "type": "boolean"
    },
    "compileCommand": {
      "description": "The command to use for compiling the SDK. This must be an array where the first element is the command and the rest are arguments."
    },
    "defaultErrorName": {
      "description": "The name of the default error class used to represent API errors",
      "pattern": "^[A-Z][a-zA-Z0-9]*$",
      "type": "string"
    },
    "enableCustomCodeRegions": {
      "description": "Allow custom code to be inserted into the generated SDK.",
      "type": "boolean"
    },
    "enableReactQuery": {
      "description": "Generate React hooks using TanStack Query.",
      "type": "boolean"
    },
    "enumFormat": {
      "description": "Determines the format to express enums in TypeScript",
      "pattern": "^(union|enum)$",
      "type": "string"
    },
    "envVarPrefix": {
      "description": "The environment variable prefix for security and global env variable overrides. If empty these overrides will not be possible"
    },
    "flattenGlobalSecurity": {
      "description": "Flatten the global security configuration if there is only a single option in the spec",
      "type": "boolean"
    },
    "flatteningOrder": {
      "description": "When flattening parameters and body fields, determines the ordering of generated method arguments.",
      "pattern": "^(parameters-first|body-first)$",
      "type": "string"
    },
    "inputModelSuffix": {
      "description": "The suffix to add to models with writeOnly fields that are created as input models",
      "pattern": "^[\\w0-9.\\-_]+$",
      "type": "string"
    },
    "maxMethodParams": {
      "description": "The maximum number of parameters a method can have before the resulting SDK endpoint is no longer 'flattened' and an input object is created instead. 0 will use input objects always. <https://www.speakeasy.com/docs/customize-sdks/methods>",
      "pattern": "^\\d+$",
      "type": "number"
    },
    "methodArguments": {
      "description": "Determines how arguments for SDK methods are generated",
      "pattern": "^(infer-optional-args|require-security-and-request)$",
      "type": "string"
    },
    "moduleFormat": {
      "description": "Specifies the module format to use when compiling the SDK.",
      "pattern": "^(commonjs|esm|dual)$",
      "type": "string"
    },
    "outputModelSuffix": {
      "description": "The suffix to add to models with writeOnly fields that are created as input models",
      "pattern": "^[\\w0-9.\\-_]+$",
      "type": "string"
    },
    "packageName": {
      "description": "The npm package name. <https://docs.npmjs.com/package-name-guidelines>.",
      "pattern": "^[\\w0-9._@\\/-]+$",
      "type": "string"
    },
    "responseFormat": {
      "description": "Determines the shape of the response envelope that is returned from SDK methods",
      "pattern": "^(envelope|envelope-http|flat)$",
      "type": "string"
    },
    "templateVersion": {
      "description": "The template version to use",
      "pattern": "^v\\d+$",
      "type": "string"
    },
    "useIndexModules": {
      "description": "Determine whether or not index modules (index.ts) are generated",
      "type": "boolean"
    },
    "version": {
      "description": "The current version of the SDK",
      "pattern": "^[\\w0-9._-]+$",
      "type": "string"
    }
  },
  "required": [
    "author",
    "version",
    "packageName"
  ],
  "additionalProperties": true
}
